package tower;

import missile.Bomb;
import battlestein.Agent;
/**
 * 
 * @author LocoRocoBattleStein
 *
 */
public class BombTower extends MissileTower {

	private int bombRange;
	
	/**
	 * Constructeur de la classe BomBTower
	 * @param effectLife
	 * @param effectSpeed
	 * @param cost
	 * @param rate
	 * @param range
	 * @param x
	 * @param y
	 * @param idPlayer
	 * @param idTower
	 * @param typeTower
	 */
	public BombTower(int effectLife, int effectSpeed, int cost, int rate, int range, int x, int y, int idPlayer, int idTower, int typeTower) {
		super(effectLife, effectSpeed, cost, rate, range, x, y, idPlayer, idTower, typeTower);
		this.setImgTower("medias/tourBombe.png");

		bombRange = range/5;
	}
	
	/**
	 * ajout d'une bombe
	 * @param posX
	 * @param posY
	 * @param finalX
	 * @param finalY
	 * @param velocity
	 * @param effectLife
	 * @param effectVelocity
	 * @param a
	 */
	public void addMissile(int posX, int posY, int finalX, int finalY, double velocity, int effectLife, int effectVelocity, Agent a) {
		Bomb b = new Bomb(posX, posY, finalX, finalY, velocity, effectLife, effectVelocity, bombRange);
		this.addMissile(b);
	}

}
